package com.netistate.pojo;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_sale")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Sale {

	private int id;
	private String type;
	private String supportDate;
	private String workContent;
	private String goal;
	private String focusContent;
	private String nextStep;
	private String rivalMsg;
	private String idea;
	private String other;
	private String leftProblem;
	private String server;
	private String begintime;
	private String endtime;
	private String workNote;
	
	private Project project;
	
	/*private List<Doc> docList;*/
	
	
	//n:n
	/*@OneToMany(mappedBy="sale")
	public List<Doc> getDocList() {
		return docList;
	}
	public void setDocList(List<Doc> docList) {
		this.docList = docList;
	}*/
	
	
	//1:n
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}
	//get set
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getSupportDate() {
		return supportDate;
	}
	public void setSupportDate(String supportDate) {
		this.supportDate = supportDate;
	}
	public String getWorkContent() {
		return workContent;
	}
	public void setWorkContent(String workContent) {
		this.workContent = workContent;
	}
	public String getGoal() {
		return goal;
	}
	public void setGoal(String goal) {
		this.goal = goal;
	}
	public String getFocusContent() {
		return focusContent;
	}
	public void setFocusContent(String focusContent) {
		this.focusContent = focusContent;
	}
	public String getNextStep() {
		return nextStep;
	}
	public void setNextStep(String nextStep) {
		this.nextStep = nextStep;
	}
	public String getRivalMsg() {
		return rivalMsg;
	}
	public void setRivalMsg(String rivalMsg) {
		this.rivalMsg = rivalMsg;
	}
	public String getIdea() {
		return idea;
	}
	public void setIdea(String idea) {
		this.idea = idea;
	}
	public String getOther() {
		return other;
	}
	public void setOther(String other) {
		this.other = other;
	}
	public String getLeftProblem() {
		return leftProblem;
	}
	public void setLeftProblem(String leftProblem) {
		this.leftProblem = leftProblem;
	}
	public String getServer() {
		return server;
	}
	public void setServer(String server) {
		this.server = server;
	}
	public String getBegintime() {
		return begintime;
	}
	public void setBegintime(String begintime) {
		this.begintime = begintime;
	}
	public String getEndtime() {
		return endtime;
	}
	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}
	public String getWorkNote() {
		return workNote;
	}
	public void setWorkNote(String workNote) {
		this.workNote = workNote;
	}
	
	
}
